package Shape;

/*
 *  user:38917
 *  date:2025/5/6
 *  time:00:46
 */

public class Test {
    public static void main1(String[] args) {
        String[] array = new String[]{"flower","rect","circle"};
        //
        for(String cur : array) {
            if(cur.equals("flower")) {
                new Flower().draw();
            }else if(cur.equals("rect")) {
                new Rect().draw();
            }else {
                new Circle().draw();
            }
        }
    }

    public static void main(String[] args) {
        Shape[] array = new Shape[]{new Flower(), new Rect(), new Circle()};
        for(Shape cur : array) {
            cur.draw();
        }
    }
}
